<template>
  <div id="app">
    <el-container>
        <el-header class="header">
            <div class="logo-box">ZhebianHerb</div>
            <div class="right-box">
                <div class="title">草药识别</div>
            </div>
        </el-header>
        <el-container>
        <el-aside><nav>
            <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                background-color="#5ba58ad8"
                text-color="#fff"
                active-text-color="#5ba58ad8">
                <el-menu-item index="1">
                    <el-icon><DocumentAdd /></el-icon>
                    <span slot="title"><router-link to="/identify/image">上传图片</router-link></span>
                </el-menu-item>
                <el-menu-item index="2">
                    <el-icon><Document /></el-icon>
                    <span slot="title"><router-link to="/identify/about">查看结果</router-link></span>
                </el-menu-item>
                <el-menu-item index="3">
                    <el-icon><Search /></el-icon>
                    <span slot="title"><router-link to="/identify/means">资料搜索</router-link></span>
                </el-menu-item>
                <el-menu-item index="4">
                    <el-icon><VideoCamera /></el-icon>
                    <span slot="title"><router-link to="/identify/video">视频介绍</router-link></span>
                </el-menu-item>
            </el-menu>
        </nav></el-aside>
        <el-container>
            <el-main class="main-box"><router-view/></el-main>
        </el-container>
        </el-container>
        <el-footer class="footer">
            <Footer></Footer>
        </el-footer>
    </el-container>  
  </div>
</template>

<script>
import Footer from '@/components/Footer.vue';

export default {
  components: {
    Footer
  }
}
</script>

<style lang="less">
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c4e50;
    background-image: url('@/assets/img/山楂花.png');
    background-size: cover;
    background-position: center;
}

/* 头部 */
.header {
    /* background-color: #549b9d; */
    background-color: #5ba58ad8;
    color: #fff;
    display: flex;
    /* justify-content：项目在主轴上的对齐方式；space-between：两端对齐，项目之间的间隔都相等 */
    justify-content: space-between;
    /* 设置页面阴影 */
    box-shadow: 2px 1px 19px rgba(0, 0, 0, .1);
}

.logo-box {
    width: 200px;
    text-align: center;
    line-height: 60px;
    font-size: 22px;
    font-weight: bold;
    font-family: SimSun;
    color: #F5D3B8;
}

.right-box {
    flex: 1;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: SimSun;
    font-weight: bold;
    font-size: 28px;
}

.content{
    height: calc(100vh-60px);
}

.el-aside {
    background-color: #5ba58ad8;
    min-height: 800px;
    max-height: 850px;
}

.aside{
    background-color: #5ba58ad8;
    height: calc(100vh-60px);
}

// 菜单栏
.el-menu{
    border-right: 0;
    background-color: #5ba58a8b;
    cursor: pointer;
    font-size: 32px;
    font-weight: bold;
    font-family: SimSun;
    .is-active{
        background-color: #ffc68e !important;
        color:  #7b7b7b !important;
    }
}

.el-row {
    margin-bottom: 20px;
    &:last-child {
        margin-bottom: 0;
        }
    }
    .el-col {
        border-radius: 4px;
    }
    .bg-purple-dark {
        background: #99a9bf;
    }
    .bg-purple {
        background: #d3dce6;
    }
    .bg-purple-light {
        background: #e5e9f2;
    }
    .grid-content {
        border-radius: 4px;
        min-height: 36px;
    }
    .row-bg {
        padding: 10px 0;
        background-color: #f9fafc;
    }

nav {
    padding: 30px;
    a {
        font-weight: bold;
        font-size: 20px;
        color: #F5D3B8;
        text-decoration: none;
        &.router-link-exact-active {
        color: #7b7b7b;
        }
    }
}

.el-main {
  padding: 0;
  margin: 0;
}

/* 内容 */
.main-box {
    background-color: #5ba58a8b;
    /* 设置页面阴影 */
    box-shadow: 2px 1px 19px rgba(8, 0, 0, 0.1);
}

.upload-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.upload-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.el-footer {
    padding: 0;
}

.footer {
    width: 100%;
}
</style>

// 上传图片功能相关样式
<style scoped>
:deep(.avatar-uploader .el-upload) {
    border: 1px dashed #666;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* 定义了头像图片的样式 */
.avatar {
    width: 600px;
    height: 400px;
    display: block;
}

/* 当鼠标悬停时，边框颜色变为 */
.avatar-uploader .el-upload:hover {
  background-color: #5ba58a8b;
}

.avatar-uploader-icon {
    font-size: 20px;
    color: #8c939d;
    width: 600px;
    height: 400px;
    line-height: 100px;
    text-align: center;
} 
</style>